package console;

public class Help implements Command {
console con;
	public Help(console con)
	{
		this.con=con;
	}
	public boolean check(String name) 
	{
		return "help".equals(name);
	}

	@Override
	public void run(String[] args) 
	{
		switch (args.length) {
		case 1:
			for(Command com:con.commands)
			{
				if(com.check(args[0]))
				{
					com.help();
				}
			}
			break;
		default:
			for(Command com:con.commands)	com.disk();
			break;
		}
	}
	@Override
	public void disk() {
		// TODO Auto-generated method stub
		System.out.println("help      - this command");
	}
	@Override
	public void help() {
		// TODO Auto-generated method stub
		System.out.println("help command");
	}

}
